/**
 * @Author:周邱艳
 * @Date:2020/6/30
 * @Description:这是组合基本信息
 */
import React,{Component} from "react";
import {Badge, Card, List, WhiteSpace} from 'antd-mobile';
import axios from "axios"
const Item = List.Item;


let data=""
export default class Stragety extends Component{
    constructor(props) {
        super(props);
        this.state = {
            combinationList:[],
            disabled: false,
        }
        this.loadData = this.loadData.bind(this)

    }
    loadData(){
        axios({
            method:"GET",
            url:"http://39.101.141.248:9527/combinationDynamicInfo/combinationDetailData",
            params:{comBaseId:this.props.fathercomBaseId}
        }).then(
            (res) => {
                //状态码判断
                if(res.data.code===200){
                    data = res.data
                    this.setState({})
                    //状态码判断
                }else if(res.data.code === 500){
                    this.props.history.push('/serverError')
                }
            }
        ).catch(function (error) {//异常处理
            console.log(error);
        })
    }
    //组件挂载后
    componentDidMount() {
        this.loadData()
    }

    render() {
        return (
            <div>

                <WhiteSpace  />
                <Card>
                    <Card.Header
                        title="启明投顾"
                        thumb={<img src={require('../../../access/images/logo.ico')} style={{width:"25%",height:"25%"}}/>}
                        extra={<div>
                            <Badge text={'策略提供方'} style={{ marginLeft: 12 }} />
                        </div>}
                    />
                    <Card.Body>
                        <div>
                            <span>{"组合描述："+data.comBaseDesc}</span>
                        </div>
                    </Card.Body>
                    {/*<Card.Footer content="组合成立于2020-06-30" extra={<div>运作476天</div>} />*/}
                </Card>

            </div>
        );
    }
}
